﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Ocmf.Types;

namespace Ocmf.Forms
{
    public partial class EditPrlActionForm : Form
    {
        public Prl Prl { get; set;}
        
        public EditPrlActionForm(Prl prl)
        {
            InitializeComponent();

            Prl = prl;

            radioButtonOn.Checked = Prl.LightState;
            radioButtonOff.Checked = !radioButtonOn.Checked;
        }

        private void buttonOk_Click(object sender, EventArgs e)
        {
            Prl.LightState = radioButtonOn.Checked;
            DialogResult = System.Windows.Forms.DialogResult.OK;
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            DialogResult = System.Windows.Forms.DialogResult.Cancel;
        }
    }
}
